import { defineStore } from "pinia";

interface IAsyncRouteState {
	keepAliveComponents:string []
}

export const useAsyncRouteStore = defineStore({
	id: "app-async-route",
	state: (): IAsyncRouteState => ({
		keepAliveComponents: [],
	}),
	actions: {
        setKeepAliveComponents(componentName) {
            this.keepAliveComponents.push(componentName);
        }
	},
});